﻿@page
@using Volo.Abp.AspNetCore.Mvc.UI.Layout
@model YaAppoint.Web.Pages.Appointments.Pools.IndexModel
@inject IPageLayout PageLayout
@{
    PageLayout.Content.Title = "号池预览";
}
@section styles
{
    <abp-style src="/Pages/Appointments/Pools/Index.css"></abp-style>
}
@section scripts
{
    <abp-script src="/Pages/Appointments/Pools/Index.cshtml.js">
        
    </abp-script>
}
<div class="content-container">
    <div id="app">
        <div class="title-container">
            <div>
                <span>{{department?department.name:''}}.{{deviceType?deviceType.name:''}}</span>
            </div>
        </div>
        <div class="container-body">
            <div class="nav-container" v-if="multiDepartmentPermission">
                <el-tree :data="treeData" :props="defaultProps" default-expand-all :highlight-current="true" :expand-on-click-node="false" v-on:node-click="nodeClicked" node-key="id">
                    <span class="custom-tree-node" slot-scope="{ node, data }">
                        <i :class="data.icon"></i>
                        <a>
                            <cite>{{node.label }}</cite>
                        </a>
                    </span>
                </el-tree>
            </div>
            <div class="table-container">
                <el-row>
                    <el-col :span="23">
                        <div class="grid-content bg-purple-dark">
                            <el-button-group>
                                <el-button  icon="el-icon-arrow-left" v-on:click="">上一页</el-button>
                                <el-button icon="el-icon-arrow-left" v-on:click="">本周</el-button>
                                <el-button icon="el-icon-arrow-left" v-on:click="">上一页</el-button>
                            </el-button-group>
                            <el-button v-on:click="showCreate" icon="el-icon-plus" size="mini" v-if="examItemAddPermission">新建项目</el-button>
                            <el-button v-on:click="showCreateDir" icon="fa fa-folder-plus" size="mini" v-if="examItemAddPermission">新建目录</el-button>
                            <el-input v-model.trim="filterName" placeholder="用户名" size="mini" style="width:300px;margin-left:10px" clearable></el-input>
                            <el-button type="primary" v-on:click="loadTableData" icon="el-icon-search" size="mini">搜索</el-button>
                            <el-button v-on:click="deleteMany" icon="el-icon-user-solid" size="mini" :disabled="!selectedExamItems || selectedExamItems.length===0" v-if="examItemDeletePermission">删除</el-button>
                            <el-button v-if="examItemSyncDataPermission" v-on:click="syncData" icon="el-icon-user-solid" size="mini">同步</el-button>
                        </div>
                    </el-col>
                    <el-col :span="1">
                        <div class="grid-content bg-purple-dark">
                            <el-button v-on:click="loadTableData" icon="el-icon-refresh" size="mini"></el-button>
                        </div>
                    </el-col>
                </el-row>
                <el-table :data="tableData" height="500" size="mini" class="el-table" row-key="id" ref="examItemTable" v-show="department && deviceType" v-on:selection-change="selectionExamItemChange" :select-on-indeterminate="true" default-expand-all :indent="20" :highlight-selection-row="true">
                    <el-table-column type="selection">

                    </el-table-column>
                    <el-table-column label="时间段" property="name">

                    </el-table-column>
                </el-table>
                <div v-show="!department" class="no-department">
                    <span>系统中还没配置任何科室！！</span>
                </div>
                <div v-show="department && !deviceType" class="no-device-type">
                    <span>还未配置科室设备类型！！</span>
                </div>
            </div>
        </div>

       
    </div>
</div>